<!--#include("header.html")-->
<!--%import("css/issuetracker.css")-->
<!--%import("filter/insert_milestone.xml")-->
<!--%import("filter/delete_milestone.xml")-->
<!--%import("filter/insert_priority.xml")-->
<!--%import("filter/delete_priority.xml")-->
<!--%import("filter/insert_type.xml")-->
<!--%import("filter/delete_type.xml")-->
<!--%import("filter/insert_component.xml")-->
<!--%import("filter/delete_component.xml")-->
<!--%import("filter/modify_display_option.xml")-->

<!--// datepicker javascript plugin load -->
<!--%load_js_plugin("ui.datepicker")-->

    <form action="{Context::getRequestUri()}" method="post" onsubmit="return procFilter(this, insert_milestone)">
    <input type="hidden" name="module_srl" value="{$module_srl}" />

        <h4 class="xeAdmin">{$lang->milestone}</h4>
        <table cellspacing="0" class="crossTable">
        <thead>
        <tr>
            <th scope="col" class="wide"><div>{$lang->name}</div></th>
            <th scope="col"><div>{$lang->completed_date}</div></th>
            <th scope="col"><div>{$lang->deadline}</div></th>
            <th scope="col"><div>{$lang->is_default}</div></th>
            <th scope="col"><div>&nbsp;</div></th>
        </tr>
        </thead>
        <tbody>
        <!--@foreach($milestone_list as $val)-->
        <tr>
            <td class="wide <!--@if($val->is_completed=='Y')-->strike<!--@end-->">{$val->title}</td>
            <td class="date center nowrap"><!--@if($val->released_date)-->{zdate($val->released_date,"Y-m-d")}<!--@else-->&nbsp;<!--@end--></td>
            <td class="date center nowrap"><!--@if($val->deadline)-->{zdate($val->deadline,"Y-m-d")}<!--@else-->&nbsp;<!--@end--></td>
            <td class="center"><!--@if($val->is_default=='Y')-->{$lang->is_default}<!--@else-->&nbsp;<!--@end--></td>
            <td class="center">
                <a href="{getUrl('module_srl',$module_srl,'act','dispIssuetrackerAdminModifyMilestone','milestone_srl',$val->milestone_srl)}"><img src="images/buttonModify.gif" alt="" /></a> &nbsp;
                <!--@if($val->is_default!='Y')--><a href="#" onclick="deleteByFilter('{$val->milestone_srl}', delete_milestone);"><img src="images/buttonDeleteX.gif" alt="" /></a><!--@else-->&nbsp;<!--@end-->
            </td>
        </tr>
        <!--@end-->

        <tr>
            <td colspan="2">
                <input name="title" type="text" id="milestone_title" class="inputTypeText fullWidth lang_code" /><br />
            </td>
            <td class="nowrap">
                <input type="hidden" name="deadline" id="date_deadline" />
                <input type="text" class="inputDate" value="" readonly="readonly" />
                <script type="text/javascript">
                (function($){
                    $(function(){
                        var option = { gotoCurrent: false,yearRange:'-100:+10', onSelect:function(){

                            $(this).prev('input[type="hidden"]').val(this.value.replace(/-/g,""))}
                        };
                        $.extend(option,$.datepicker.regional['{$lang_type}']);
                        $(".inputDate").datepicker(option);
                    });
                })(jQuery);
                </script>
            </td>
            <td class="center"><input type="checkbox" name="is_default" value="Y" /></td>
            <td class="vtop" rowspan="2"><input type="submit" value="{$lang->cmd_registration}" accesskey="s"class="btnSubmit" /></td>
        </tr>
        <tr>
            <td colspan="5">
                <textarea name="description" class="inputTypeTextArea fullWidth"></textarea>
            </td>
        </tr>
        </tbody>
        </table>
    </form>

    <form id="deleteForm" action="./" method="post">
    <input type="hidden" id="target_srl" name="target_srl" value="" />
    <input type="hidden" name="mid" value="{$mid}" />
    <input type="hidden" name="vid" value="{$vid}" />
    </form>

    <form action="./" method="post" onsubmit="return procFilter(this, insert_priority)">
    <input type="hidden" name="module_srl" value="{$module_srl}" />

        <h4 class="xeAdmin">{$lang->priority}</h4>
        <table cellspacing="0" class="crossTable">
        <thead>
        <tr>
            <th scope="col" class="wide"><div>{$lang->name}</div></th>
            <th scope="col"><div>{$lang->order}</div></th>
            <th scope="col"><div>{$lang->is_default}</div></th>
            <th scope="col"><div>&nbsp;</div></th>
        </tr>
        </thead>
        <tbody>
        <!--@foreach($priority_list as $val)-->
        <tr>
            <td class="wide">{$val->title}</td>
            <td class="center number">{$val->listorder}</td>
            <td class="center"><!--@if($val->is_default=='Y')-->{$lang->is_default}<!--@else-->&nbsp;<!--@end--></td>
            <td class="button">
                <a href="{getUrl('module_srl',$module_srl,'act','dispIssuetrackerAdminModifyPriority','priority_srl',$val->priority_srl)}"><img src="images/buttonModify.gif" alt="" /></a> &nbsp;
                <!--@if($val->is_default!='Y')--><a href="#" onclick="deleteByFilter('{$val->priority_srl}', delete_priority);"><img src="images/buttonDeleteX.gif" /></a><!--@else-->&nbsp;<!--@end-->
            </td>
        </tr>
        <!--@end-->
        <tr>
            <td><input name="title" type="text" id="priority_title" class="inputTypeText fullWidth lang_code" /></td>
            <td>&nbsp;</td>
            <td class="center"><input type="checkbox" name="is_default" value="Y" /></td>
            <td><input type="submit" value="{$lang->cmd_registration}" class="btnSubmit" accesskey="s"/></td>
        </tr>
        </tbody>
        </table>

    </form>

    <form action="./" method="post" onsubmit="return procFilter(this, insert_type)">
    <input type="hidden" name="module_srl" value="{$module_srl}" />
        <h4 class="xeAdmin">{$lang->type}</h4>
        <table cellspacing="0" class="crossTable">
        <thead>
        <tr>
            <th scope="col" class="wide"><div>{$lang->type}</div></th>
            <th scope="col"><div>{$lang->is_default}</div></th>
            <th scope="col"><div>&nbsp;</div></th>
        </tr>
        </thead>
        <tbody>
        <!--@foreach($type_list as $val)-->
        <tr>
            <td class="wide">{$val->title}</td>
            <td class="center"><!--@if($val->is_default=='Y')-->{$lang->is_default}<!--@else-->&nbsp;<!--@end--></td>
            <td class="center">
                <a href="{getUrl('module_srl',$module_srl,'act','dispIssuetrackerAdminModifyType','type_srl',$val->type_srl)}"><img src="images/buttonModify.gif" alt="" /></a> &nbsp;
                <!--@if($val->is_default!='Y')--><a href="#" onclick="deleteByFilter('{$val->type_srl}', delete_type);"><img src="images/buttonDeleteX.gif" alt="" /></a><!--@else-->&nbsp;<!--@end-->
            </td>
        </tr>
        <!--@end-->
        <tr>
            <td><input name="title" type="text" id="type_title" class="inputTypeText fullWidth lang_code" /></td>
            <td class="center"><input type="checkbox" name="is_default" value="Y" /></td>
            <td><input type="submit" value="{$lang->cmd_registration}" class="btnSubmit" accesskey="s"/></td>
		</tr>
        </tbody>
        </table>
    </form>
<!--// HalfTable Left -->

    <form action="./" method="post" onsubmit="return procFilter(this, insert_component)">
    <input type="hidden" name="module_srl" value="{$module_srl}" />

        <h4 class="xeAdmin">{$lang->component}</h4>
        <table cellspacing="0" class="crossTable">
        <thead>
        <tr>
            <th scope="col" class="wide"><div>{$lang->component}</div></th>
            <th scope="col"><div>{$lang->is_default}</div></th>
            <th scope="col"><div>&nbsp;</div></th>
        </tr>
        </thead>
        <tbody>
        <!--@foreach($component_list as $val)-->
        <tr>
            <td class="wide">{$val->title}</td>
            <td class="center"><!--@if($val->is_default=='Y')-->{$lang->is_default}<!--@else-->&nbsp;<!--@end--></td>
            <td class="center">
                <a href="{getUrl('module_srl',$module_srl,'act','dispIssuetrackerAdminModifyComponent','component_srl',$val->component_srl)}"><img src="images/buttonModify.gif" alt="" /></a> &nbsp;
                <!--@if($val->is_default!='Y')--><a href="#" onclick="deleteByFilter('{$val->component_srl}', delete_component);"><img src="images/buttonDeleteX.gif" alt="" /></a><!--@else-->&nbsp;<!--@end-->
            </td>
        </tr>

        <!--@end-->
        <tr>
            <td><input name="title" type="text" id="component_title" class="inputTypeText fullWidth lang_code" /></td>
            <td class="center"><input type="checkbox" name="is_default" value="Y" /></td>
            <td><input type="submit" value="{$lang->cmd_registration}" class="btnSubmit" accesskey="s"/></td>
		</tr>
        </tbody>
        </table>
    </form>

    <form action="./" method="post" onsubmit="return procFilter(this, modify_display_option)">
    <input type="hidden" name="module_srl" value="{$module_srl}" />

        <h4 class="xeAdmin">{$lang->display_option}</h4>
        <ol class="displayOpt">
            <!--@foreach($display_option as $key => $val)-->
            <li><input type="checkbox" name="displayopts" value="{$key}" id="display_{$key}" <!--@if($val->checked)-->checked="checked"<!--@end--> <!--@if($key=='title')-->disabled="disabled"<!--@end--> /><label for="display_{$key}">{$val->title}</label></li>
            <!--@end-->
        </ol>
        <div class="right">
        <input type="submit" value="{$lang->cmd_modify}" class="btnSubmit" accesskey="s"/>
        </div>
    </form>
